<extend name="Layout:base"/>

<block name="title">比赛报名系统</block>

<block name="css"></block>

<block name="main">
    <div class="container">
        <div class="section" id="mysec">
            <div class="row">
                <div class="col s12 m6 l6 offset-m3 offset-l3">
                    <div class="card-panel">
                        <h4 class="center">修改密码</h4>
                        <form action="" method="post">
                            <div class="row">
                                <div class="input-field col s12 m12 l12">
                                    <input id="password" name="password" type="text" class="validate">
                                    <label for="password">新密码</label>
                                </div>
                                <div class="input-field col s12 m12 l12">
                                    <input id="password2" name="password2" type="text" class="validate">
                                    <label for="password2">再次密码</label>
                                </div>
                            </div>
                            <div class="row center">
                                <input class="waves-effect waves-light btn green" type="submit"
                                       onclick="return checkPwd()" value="修改">
                                <input class="waves-effect waves-light btn red" type="reset" value="重置">
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>

<block name="js">
    <script>
        function checkPwd() {
            if ($("#password").val() == $("#password2").val()) {
                return true;
            } else {
                alert("两次密码不一样");
                return false;
            }
        }
    </script>
</block>